<?php
	// 兼容低版本 PHP
	if(!function_exists('array_column')){
		function array_column($arr,$key){ return array_map(function($val) use ($key){ return $val[$key]; },$arr); }
	}

	$taglist = '';
	$arr = db_find('git_tags_thread', array('tid'=>$tid), array(), 1, 20);
	if($arr){
		$tagid = array_column($arr, 'tagid');
		$tag = db_find('git_tags',array('tagid'=>$tagid));
		foreach($tag as $k){
			$taglist .= $k['name'].' ';
		}
	}
?>

<div class="input-group mb-3">
	<div class="input-group-prepend"><span class="input-group-text" id="basic-addon1"><i class="icon-tags"></i></span></div>
	<input type="text" class="form-control" placeholder="标签" aria-label="标签" aria-describedby="basic-addon1" name="test_tag" value="<?php echo $taglist;?>">
</div>